﻿Imports System
Imports System.Collections.Generic
Imports System.Workflow.ComponentModel

Namespace System.Workflow.Activities
    <Serializable> _
    Friend NotInheritable Class ConditionedActivityGroupStateInfo
        ' Methods
        Friend Sub New(ByVal cag As ConditionedActivityGroup)
            Dim count As Integer = cag.EnabledActivities.Count
            Me.childActivityStats = New Dictionary([Of] String, CAGChildStats)(count)
            Dim activity As Activity
            For Each activity In cag.EnabledActivities
                Me.childActivityStats.Item(activity.QualifiedName) = New CAGChildStats
            Next
        End Sub


        ' Properties
        Friend ReadOnly Property ChildrenStats As Dictionary([Of] String, CAGChildStats)
            Get
                Return Me.childActivityStats
            End Get
        End Property

        Friend Property Completed As Boolean
            Get
                Return Me.completed
            End Get
            Set(ByVal value As Boolean)
                Me.completed = value
            End Set
        End Property

        Friend Property Testing As Boolean
            Get
                Return Me.testing
            End Get
            Set(ByVal value As Boolean)
                Me.testing = value
            End Set
        End Property


        ' Fields
        Private childActivityStats As Dictionary([Of] String, CAGChildStats)
        Private completed As Boolean
        Private testing As Boolean
    End Class
End Namespace

